Integrand size = 23, antiderivative size = 361 \[ \int \frac {\cot ^2(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx=\frac {\cot (c+d x) E\left (\arcsin \left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{\sqrt {a+b} d}-\frac {\cot (c+d x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right ),\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{\sqrt {a+b} d}+\frac {2 \sqrt {a+b} \cot (c+d x) \operatorname {EllipticPi}\left (\frac {a+b}{a},\arcsin \left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right ),\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{a d}-\frac {\cot (c+d x)}{d \sqrt {a+b \sec (c+d x)}}+\frac {b^2 \tan (c+d x)}{\left (a^2-b^2\right ) d \sqrt {a+b \sec (c+d x)}} \]
cot(d*x+c)*EllipticE((a+b*sec(d*x+c))^(1/2)/(a+b)^(1/2),((a+b)/(a-b))^(1/2 ))*(b*(1-sec(d*x+c))/(a+b))^(1/2)*(-b*(1+sec(d*x+c))/(a-b))^(1/2)/d/(a+b)^ (1/2)-cot(d*x+c)*EllipticF((a+b*sec(d*x+c))^(1/2)/(a+b)^(1/2),((a+b)/(a-b) )^(1/2))*(b*(1-sec(d*x+c))/(a+b))^(1/2)*(-b*(1+sec(d*x+c))/(a-b))^(1/2)/d/ (a+b)^(1/2)+2*cot(d*x+c)*EllipticPi((a+b*sec(d*x+c))^(1/2)/(a+b)^(1/2),(a+ b)/a,((a+b)/(a-b))^(1/2))*(a+b)^(1/2)*(b*(1-sec(d*x+c))/(a+b))^(1/2)*(-b*( 1+sec(d*x+c))/(a-b))^(1/2)/a/d-cot(d*x+c)/d/(a+b*sec(d*x+c))^(1/2)+b^2*tan (d*x+c)/(a^2-b^2)/d/(a+b*sec(d*x+c))^(1/2)
Time = 13.15 (sec) , antiderivative size = 366, normalized size of antiderivative = 1.01 \[ \int \frac {\cot ^2(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx=\frac {\left (-8 b (a+b) \sqrt {\frac {\cos (c+d x)}{1+\cos (c+d x)}} \sqrt {\frac {b+a \cos (c+d x)}{(a+b) (1+\cos (c+d x))}} \cot \left (\frac {1}{2} (c+d x)\right ) E\left (\arcsin \left (\tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a-b}{a+b}\right )-8 \left (2 a^2-a b-3 b^2\right ) \sqrt {\frac {\cos (c+d x)}{1+\cos (c+d x)}} \sqrt {\frac {b+a \cos (c+d x)}{(a+b) (1+\cos (c+d x))}} \cot \left (\frac {1}{2} (c+d x)\right ) \operatorname {EllipticF}\left (\arcsin \left (\tan \left (\frac {1}{2} (c+d x)\right )\right ),\frac {a-b}{a+b}\right )+4 (a-b) \csc ^2(c+d x) \left (2 \cos (c+d x) (b+a \cos (c+d x))+32 (a+b) \cos ^3\left (\frac {1}{2} (c+d x)\right ) \sqrt {\frac {\cos (c+d x)}{1+\cos (c+d x)}} \sqrt {\frac {b+a \cos (c+d x)}{(a+b) (1+\cos (c+d x))}} \operatorname {EllipticPi}\left (-1,\arcsin \left (\tan \left (\frac {1}{2} (c+d x)\right )\right ),\frac {a-b}{a+b}\right ) \sin \left (\frac {1}{2} (c+d x)\right )\right )\right ) \tan (c+d x)}{8 \left (-a^2+b^2\right ) d \sqrt {a+b \sec (c+d x)}} \]
((-8*b*(a + b)*Sqrt[Cos[c + d*x]/(1 + Cos[c + d*x])]*Sqrt[(b + a*Cos[c + d *x])/((a + b)*(1 + Cos[c + d*x]))]*Cot[(c + d*x)/2]*EllipticE[ArcSin[Tan[( c + d*x)/2]], (a - b)/(a + b)] - 8*(2*a^2 - a*b - 3*b^2)*Sqrt[Cos[c + d*x] /(1 + Cos[c + d*x])]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]) )]*Cot[(c + d*x)/2]*EllipticF[ArcSin[Tan[(c + d*x)/2]], (a - b)/(a + b)] + 4*(a - b)*Csc[c + d*x]^2*(2*Cos[c + d*x]*(b + a*Cos[c + d*x]) + 32*(a + b )*Cos[(c + d*x)/2]^3*Sqrt[Cos[c + d*x]/(1 + Cos[c + d*x])]*Sqrt[(b + a*Cos [c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d* x)/2]], (a - b)/(a + b)]*Sin[(c + d*x)/2]))*Tan[c + d*x])/(8*(-a^2 + b^2)* d*Sqrt[a + b*Sec[c + d*x]])
Time = 0.76 (sec) , antiderivative size = 361, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3042, 4384, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cot ^2(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\cot \left (c+d x+\frac {\pi }{2}\right )^2 \sqrt {a+b \csc \left (c+d x+\frac {\pi }{2}\right )}}dx\) |
\(\Big \downarrow \) 4384 |
\(\displaystyle \int \left (\frac {\csc ^2(c+d x)}{\sqrt {a+b \sec (c+d x)}}-\frac {1}{\sqrt {a+b \sec (c+d x)}}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {b^2 \tan (c+d x)}{d \left (a^2-b^2\right ) \sqrt {a+b \sec (c+d x)}}-\frac {\cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right ),\frac {a+b}{a-b}\right )}{d \sqrt {a+b}}+\frac {\cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} E\left (\arcsin \left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{d \sqrt {a+b}}+\frac {2 \sqrt {a+b} \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} \operatorname {EllipticPi}\left (\frac {a+b}{a},\arcsin \left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right ),\frac {a+b}{a-b}\right )}{a d}-\frac {\cot (c+d x)}{d \sqrt {a+b \sec (c+d x)}}\) |
(Cot[c + d*x]*EllipticE[ArcSin[Sqrt[a + b*Sec[c + d*x]]/Sqrt[a + b]], (a + b)/(a - b)]*Sqrt[(b*(1 - Sec[c + d*x]))/(a + b)]*Sqrt[-((b*(1 + Sec[c + d *x]))/(a - b))])/(Sqrt[a + b]*d) - (Cot[c + d*x]*EllipticF[ArcSin[Sqrt[a + b*Sec[c + d*x]]/Sqrt[a + b]], (a + b)/(a - b)]*Sqrt[(b*(1 - Sec[c + d*x]) )/(a + b)]*Sqrt[-((b*(1 + Sec[c + d*x]))/(a - b))])/(Sqrt[a + b]*d) + (2*S qrt[a + b]*Cot[c + d*x]*EllipticPi[(a + b)/a, ArcSin[Sqrt[a + b*Sec[c + d* x]]/Sqrt[a + b]], (a + b)/(a - b)]*Sqrt[(b*(1 - Sec[c + d*x]))/(a + b)]*Sq rt[-((b*(1 + Sec[c + d*x]))/(a - b))])/(a*d) - Cot[c + d*x]/(d*Sqrt[a + b* Sec[c + d*x]]) + (b^2*Tan[c + d*x])/((a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x] ])
3.4.34.3.1 Defintions of rubi rules used
Int[cot[(c_.) + (d_.)*(x_)]^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_ ), x_Symbol] :> Int[ExpandIntegrand[(a + b*Csc[c + d*x])^n, (-1 + Sec[c + d *x]^2)^(-m/2), x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[a^2 - b^2, 0] && ILtQ[m/2, 0] && IntegerQ[n - 1/2] && EqQ[m, -2]
Leaf count of result is larger than twice the leaf count of optimal. \(1373\) vs. \(2(330)=660\).
Time = 7.10 (sec) , antiderivative size = 1374, normalized size of antiderivative = 3.81
-1/2/d/(a-b)/(a+b)*((a*(1-cos(d*x+c))^2*csc(d*x+c)^2-b*(1-cos(d*x+c))^2*cs c(d*x+c)^2-a-b)/((1-cos(d*x+c))^2*csc(d*x+c)^2-1))^(1/2)*((1-cos(d*x+c))^2 *csc(d*x+c)^2-1)*(-4*(-(1-cos(d*x+c))^2*csc(d*x+c)^2+1)^(1/2)*(-(a*(1-cos( d*x+c))^2*csc(d*x+c)^2-b*(1-cos(d*x+c))^2*csc(d*x+c)^2-a-b)/(a+b))^(1/2)*E llipticF(cot(d*x+c)-csc(d*x+c),((a-b)/(a+b))^(1/2))*a^2*(-cot(d*x+c)+csc(d *x+c))+2*(-(1-cos(d*x+c))^2*csc(d*x+c)^2+1)^(1/2)*(-(a*(1-cos(d*x+c))^2*cs c(d*x+c)^2-b*(1-cos(d*x+c))^2*csc(d*x+c)^2-a-b)/(a+b))^(1/2)*EllipticF(cot (d*x+c)-csc(d*x+c),((a-b)/(a+b))^(1/2))*a*b*(-cot(d*x+c)+csc(d*x+c))+6*(-( 1-cos(d*x+c))^2*csc(d*x+c)^2+1)^(1/2)*(-(a*(1-cos(d*x+c))^2*csc(d*x+c)^2-b *(1-cos(d*x+c))^2*csc(d*x+c)^2-a-b)/(a+b))^(1/2)*EllipticF(cot(d*x+c)-csc( d*x+c),((a-b)/(a+b))^(1/2))*b^2*(-cot(d*x+c)+csc(d*x+c))-2*(-(1-cos(d*x+c) )^2*csc(d*x+c)^2+1)^(1/2)*(-(a*(1-cos(d*x+c))^2*csc(d*x+c)^2-b*(1-cos(d*x+ c))^2*csc(d*x+c)^2-a-b)/(a+b))^(1/2)*EllipticE(cot(d*x+c)-csc(d*x+c),((a-b )/(a+b))^(1/2))*a*b*(-cot(d*x+c)+csc(d*x+c))-2*(-(1-cos(d*x+c))^2*csc(d*x+ c)^2+1)^(1/2)*(-(a*(1-cos(d*x+c))^2*csc(d*x+c)^2-b*(1-cos(d*x+c))^2*csc(d* x+c)^2-a-b)/(a+b))^(1/2)*EllipticE(cot(d*x+c)-csc(d*x+c),((a-b)/(a+b))^(1/ 2))*b^2*(-cot(d*x+c)+csc(d*x+c))+8*(-(1-cos(d*x+c))^2*csc(d*x+c)^2+1)^(1/2 )*(-(a*(1-cos(d*x+c))^2*csc(d*x+c)^2-b*(1-cos(d*x+c))^2*csc(d*x+c)^2-a-b)/ (a+b))^(1/2)*EllipticPi(cot(d*x+c)-csc(d*x+c),-1,((a-b)/(a+b))^(1/2))*a^2* (-cot(d*x+c)+csc(d*x+c))-8*(-(1-cos(d*x+c))^2*csc(d*x+c)^2+1)^(1/2)*(-(...
\[ \int \frac {\cot ^2(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx=\int { \frac {\cot \left (d x + c\right )^{2}}{\sqrt {b \sec \left (d x + c\right ) + a}} \,d x } \]
\[ \int \frac {\cot ^2(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx=\int \frac {\cot ^{2}{\left (c + d x \right )}}{\sqrt {a + b \sec {\left (c + d x \right )}}}\, dx \]
\[ \int \frac {\cot ^2(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx=\int { \frac {\cot \left (d x + c\right )^{2}}{\sqrt {b \sec \left (d x + c\right ) + a}} \,d x } \]
\[ \int \frac {\cot ^2(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx=\int { \frac {\cot \left (d x + c\right )^{2}}{\sqrt {b \sec \left (d x + c\right ) + a}} \,d x } \]
Timed out. \[ \int \frac {\cot ^2(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx=\int \frac {{\mathrm {cot}\left (c+d\,x\right )}^2}{\sqrt {a+\frac {b}{\cos \left (c+d\,x\right )}}} \,d x \]